package com.xiaoy.core.email.entity;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.mail.EmailAttachment;

import com.xiaoy.util.format.DateUtil;


public class Email {
	private String from_name="";			// 发件人
	private String from_nick="";			// 发件人的别称
	private String from_mail="";			// 发件人 邮箱
	private String password="";
					
	private String to_name="";				// 收件人
	private String to_nick="";				// 收件人的别称
	private String to_mail="";				// 收件人 邮箱
	
	private String cc_name="";				// 抄送人
	private String cc_nick="";				// 抄送人的别称
	private String cc_mail="";				// 抄送人 邮箱
	
	private String bcc_name="";			// 密送人
	private String bbc_nick="";			// 密送人的别称
	private String bcc_mail="";			// 秘送人 邮箱
	
	private String subject="";				// 主题
	private String content="";				// 内容
	
	private String hostName="";			
	private String prot="";
	
	private String createDate = "";
	
	private List<EmailAttachment> attachment = new ArrayList<EmailAttachment>();
	
	public String getCreateDate() {
		
		if ("".equals(createDate)) {
			return DateUtil.getNowDate();
		}
		return createDate;
	}
	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}
	public String getHostName() {
		return hostName;
	}
	public void setHostName(String hostName) {
		this.hostName = hostName;
	}
	public String getProt() {
		return prot;
	}
	public void setProt(String prot) {
		this.prot = prot;
	}
	public String getFrom_name() {
		return from_name;
	}
	public void setFrom_name(String from_name) {
		this.from_name = from_name;
	}
	public String getFrom_nick() {
		return from_nick;
	}
	public void setFrom_nick(String from_nick) {
		this.from_nick = from_nick;
	}
	public String getFrom_mail() {
		return from_mail;
	}
	public void setFrom_mail(String from_mail) {
		this.from_mail = from_mail;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getTo_name() {
		return to_name;
	}
	public void setTo_name(String to_name) {
		this.to_name = to_name;
	}
	public String getTo_nick() {
		return to_nick;
	}
	public void setTo_nick(String to_nick) {
		this.to_nick = to_nick;
	}
	public String getTo_mail() {
		return to_mail;
	}
	public void setTo_mail(String to_mail) {
		this.to_mail = to_mail;
	}
	public String getCc_name() {
		return cc_name;
	}
	public void setCc_name(String cc_name) {
		this.cc_name = cc_name;
	}
	public String getCc_nick() {
		return cc_nick;
	}
	public void setCc_nick(String cc_nick) {
		this.cc_nick = cc_nick;
	}
	public String getCc_mail() {
		return cc_mail;
	}
	public void setCc_mail(String cc_mail) {
		this.cc_mail = cc_mail;
	}
	public String getBcc_name() {
		return bcc_name;
	}
	public void setBcc_name(String bcc_name) {
		this.bcc_name = bcc_name;
	}
	public String getBbc_nick() {
		return bbc_nick;
	}
	public void setBbc_nick(String bbc_nick) {
		this.bbc_nick = bbc_nick;
	}
	public String getBcc_mail() {
		return bcc_mail;
	}
	public void setBcc_mail(String bcc_mail) {
		this.bcc_mail = bcc_mail;
	}
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	public List<EmailAttachment> getAttachment() {
		return attachment;
	}
	public void setAttachment(List<EmailAttachment> attachment) {
		this.attachment = attachment;
	}
	public void addAttachment(List<EmailAttachment> attachment) {
		this.attachment.addAll(attachment);
	}
	public void addAttachment(EmailAttachment attachment) {
		this.attachment.add(attachment);
	}
	
	
}
